package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DonationMapper;
import com.ruoyi.system.domain.Donation;
import com.ruoyi.system.service.IDonationService;

/**
 * 捐款Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-08
 */
@Service
public class DonationServiceImpl implements IDonationService 
{
    @Autowired
    private DonationMapper donationMapper;

    /**
     * 查询捐款
     * 
     * @param dId 捐款主键
     * @return 捐款
     */
    @Override
    public Donation selectDonationByDId(Long dId)
    {
        return donationMapper.selectDonationByDId(dId);
    }

    /**
     * 查询捐款列表
     * 
     * @param donation 捐款
     * @return 捐款
     */
    @Override
    public List<Donation> selectDonationList(Donation donation)
    {
        return donationMapper.selectDonationList(donation);
    }

    /**
     * 新增捐款
     * 
     * @param donation 捐款
     * @return 结果
     */
    @Override
    public int insertDonation(Donation donation)
    {
        return donationMapper.insertDonation(donation);
    }

    /**
     * 修改捐款
     * 
     * @param donation 捐款
     * @return 结果
     */
    @Override
    public int updateDonation(Donation donation)
    {
        return donationMapper.updateDonation(donation);
    }

    /**
     * 批量删除捐款
     * 
     * @param dIds 需要删除的捐款主键
     * @return 结果
     */
    @Override
    public int deleteDonationByDIds(Long[] dIds)
    {
        return donationMapper.deleteDonationByDIds(dIds);
    }

    /**
     * 删除捐款信息
     * 
     * @param dId 捐款主键
     * @return 结果
     */
    @Override
    public int deleteDonationByDId(Long dId)
    {
        return donationMapper.deleteDonationByDId(dId);
    }
}
